<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="UTF-8"%>
<%@include file="/lib/common/basedir.jsp"%>
<!DOCTYPE html>
<html lang="en">
<head>
<%@include file="/lib/common/headerResource.html"%>
<!--sidebar-->
<link href="<%=basedir%>/lib/css/sidebar.css" rel="stylesheet">


<!--sweet-alert-->
<link rel="stylesheet" type="text/css"
	href="<%=basedir%>/lib/util/sweet-alert/sweet-alert.css">

<title>my membership</title>

<style>
.content {
	margin-top: 1em;
	
}

.title {
	font-size: 1.4em;
	padding-left:1.8em;
}

.form-group {
	margin-bottom: 2.2em;
}

.operation{
	margin-left:1em;
}

.operation a{
	font-size:0.9em;
	text-decoration:none;
}

</style>
</head>
<body>
	<div class="container-fluid">
		<div class="row">
			<!--左侧导航-->
			<div class="col-sm-3 col-md-2 sidebar">
				<%@include file="../sidebar.jsp"%>
			</div>
			<!--右面板-->
			<div
				class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 rightPanel">
				<div class="row">
					<h2 class="page-header col-md-10">我的会员</h2>
				</div>
				<div class="row">
				<form class="form-horizontal content col-md-10">
					<div class="form-group">
						<div class="row">
							<span class="title ">会员级别：<%=request.getAttribute("rating") %> </span>
							<span class="operation"><a href="<%=basedir%>/member/renewal">充值提升会员级别</a></span>
						</div>
					</div>
					
					<div class="form-group">
						<div class="row">
							<span class="title ">会员卡余额：<%=request.getAttribute("balance") %></span>
							<span class="operation"><a href="<%=basedir%>/member/renewal">充值</a></span>
						</div>
					</div>

					<div class="form-group">
						<div class="row">
							<span class="title">我的积分: <%=request.getAttribute("points") %></span>
							<span class="operation"><a href="<%=basedir %>/member/pointsToBalance">积分兑换</a></span>
						</div>
					</div>
					
					<div class="form-group">
						<div class="row">
							<span class="title">我的会员卡: <%=request.getAttribute("cardId") %></span>
							<span class="operation delete"><a href="#">注销卡号</a></span>
						</div>
					</div>
				</form>
				</div>
				
				<%@include file="/lib/common/userUIFooter.html" %>
				
			</div>
		</div>
	</div>
	
	<!-- jquery and bootstrap js -->
	<%@include file="/lib/common/footerResource.html"%>
	
	<script src="<%=basedir%>/lib/util/sweet-alert/sweet-alert.js"></script>
	<script>
	$(document).ready(function() {
		$('.delete').on('click', function() {
			swal({
				title : "",
				text : "此操作不可逆,你确定要注销此账号吗？",
				allowOutsideClick : true,
				showCancelButton : true,
				confirmButtonColor : "#DD6B55",
				confirmButtonText : "确认",
				cancelButtonText : "取消",
				closeOnConfirm : false
			}, function() {
				window.location.href = '<%=basedir%>/member/delete';
													});
										});
	});
	</script>
</body>
</html>